#ifndef GLRENDERENGINE_H
#define GLRENDERENGINE_H

#include "Framework/Prerequisites.h"
#include "Graphics/OpenGL/GLPrerequisites.h"
#include "Graphics/IRenderEngine.h"

namespace tyro
{
	namespace Graphics
	{
		class GLRenderEngine : public IRenderEngine
		{
		public:
			GLRenderEngine(Engine::Engine* engine);
			~GLRenderEngine();

			IRenderWindow* Initialise(const char* const title = "Tyro Engine");

			void BeginFrame(void);
			void EndFrame(void);

			void UpdateRenderTarget( void );
			void SwapRenderTargetBuffers( void );
			void DrawCube();

			void SetViewport(IViewport* viewport);
			void SetProjectionMatrix(const Math::Matrix4f& matrix);
			void SetModelViewMatrix();

			void MakeGLMatrix( GLfloat gl_mat[16], const Math::Matrix4f& matrix );

			void ClearBuffers( UINT_32 bufferFlags, const Colour& colour = Colour::Grey, FLOAT_32 depth = 1.0f, UINT16 stencil = 0.0f);

			
		private:
			
		};
	}
}
#endif